﻿$(function () {
    try {
        //check if only permission read is 1 then user exist permission readonly
        //if user not exist permission write then disasble input, select and textarea
        if ($("#OnlyPermissionRead").val() == "1") {
            $("#main :input").prop("disabled", true);
            $("#main :select").prop("disabled", true);
            $("#main :textarea").prop("disabled", true);
        }
    } catch (ex) {
    }

    $('form :input').change(function () {
        $("#flagChange").val("1");
    });
    $('select').on('change', function () {
        $("#flagChange").val("1");
    });
    $('input :file').change(function () {
        $("#flagChange").val("1");
    });
});